<%@ page contentType="text/html; charset=utf-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>爱购物-商城 - 首页</title>
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/static/css/style.css"/>
    <style type="text/css">
        #magnifier {
            width: 300px;
            height: 300px;
            position: absolute;
            /*top:200px;
            left:400px;*/
            font-size: 0;
            border: 1px solid #000;
        }

        #img {
            width: 300px;
            height: 300px;
        }

        #Browser {
            border: 1px solid #000;
            z-index: 100;
            position: absolute;
            background: #555;
        }

        #mag {
            border: 1px solid #000;
            overflow: hidden;
            z-index: 100;
        }
    </style>
</head>
<body>
<c:import url="/front/header"/>
<div id="position" class="wrap">
    您现在的位置：<a href="${pageContext.request.contextPath}/index">爱购物-商城</a> &gt;
    <a href="${pageContext.request.contextPath}/product/list">商品分类</a> &gt; ${product.category.name }
</div>
<div id="main" class="wrap">
    <c:import url="/front/lefter"/>
    <div id="product" class="main clearfix">
        <h1>${product.name }</h1>
        <div class="infos">
            <div id="magnifier">
                <img src="${pageContext.request.contextPath}${product.fileName }" id="img"/>
                <div id="Browser"></div>
            </div>
            <div id="mag"><img id="magnifierImg"/></div>
            <div class="buy">
                <p>商城价：<span class="price">￥${product.price }</span></p>
                <p>邮递方式：<font color="red">圆通快递</font></p>
                <p>热卖程度：☆☆☆☆☆</p>
                <p>库　存：<span id="stock">${product.stock }</span></p>
                <p>购买数量：<input type="button" value="  -  " onclick="jian()"/>
                    <input align="middle" type="text" value="1" id="count" name="count" onblur="checkcount()"/>
                    <input type="button" value="  +  " onclick="jia()"/>
                </p>
                <div class="button">
                    <input type="button" name="button" value="" onclick="shopAdd(${product.id})"/>
                    <a href="javascript:shopAdd2(${product.id})">放入购物车</a>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="introduce">
            <h2><strong>商品详情</strong></h2>
            <div class="text">
                ${product.description }<br/>
            </div>
        </div>
    </div>
</div>
<c:import url="/static/page/footer.jsp"/>
<script src="${pageContext.request.contextPath}/static/js/function.js"></script>
<script src="${pageContext.request.contextPath}/static/js/product-view.js"></script>
</body>
</html>

